package com.neu.cpspgateway.controller;

import com.neu.cpspgateway.service.SubSystemService;
import com.neu.cpspgateway.util.result.Result;
import com.neu.cpspgateway.util.result.ResultGenerator;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RequestMapping("/subSystem")
@RestController
public class SubSystemController {

    @Autowired
    SubSystemService subSystemService;

    @GetMapping("/all")
    public Result getSubSystem(){
        return ResultGenerator.genSuccessResult(subSystemService.listAllSubSystem());
    }

}
